package t327.pojo.views;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class SampleSheetListView {

  private String clientName;
  private String staffName;
  private String styleName;
  private Long sampleSheetId;
  private String sampleSheetNum;
  private Long clientId;
  private Long styleNumberId;
  private Long ingredientId;
  private String suttle;
  private Long cardboardMaster;
  private Long carBoardEngineer;
  private String designNumber;
  private Long stylistId;
  private String styleUnit;
  private String remark;
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  private Date patternDate;
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  private Date finishedPlateDate;
  private String processDecompositionDiagramSrc;
  private String engineer1;
  private String engineer2;
  private String styleNumber;
  private Long logicDel;
  private Long auditStatus;
  private String auditStatusStr;
  private String brand;
  private String model;

  public String getAuditStatusStr(){
    if (auditStatus!=null){
      if (auditStatus.equals(0L)){
        return "未提交审核";
      }else if (auditStatus.equals(1L)){
        return "已提交审核";
      }else if (auditStatus.equals(2L)){
        return "审核通过";
      }else if (auditStatus.equals(3L)){
        return "审核未通过";
      }
      return "未知状态";
    }
    return "未知状态";
  }

}
